package com.jiming.webrpc;

import com.alibaba.fastjson.JSON;

public class Customer {
	private String token;
	
	private String email;
	
	private String natIp;
	
	private int natPort;
	
	private int localPort;
	
	private long activeTime;

	public String getToken() {
		return token;
	}

	public Customer setToken(String token) {
		this.token = token;
		return this;
	}

	public String getEmail() {
		return email;
	}

	public Customer setEmail(String email) {
		this.email = email;
		return this;
	}

	public String getNatIp() {
		return natIp;
	}

	public Customer setNatIp(String natIp) {
		this.natIp = natIp;
		return this;
	}

	public int getNatPort() {
		return natPort;
	}

	public Customer setNatPort(int natPort) {
		this.natPort = natPort;
		return this;
	}

	public int getLocalPort() {
		return localPort;
	}

	public Customer setLocalPort(int localPort) {
		this.localPort = localPort;
		return this;
	}
	
	public long getActiveTime() {
		return activeTime;
	}

	public void setActiveTime(long activeTime) {
		this.activeTime = activeTime;
	}

	public static Customer newBuiled() {
		return new Customer();
	}
	
	public static Customer newBuiled(String customerJson) {
		return JSON.parseObject(customerJson, Customer.class);
	}
	
	public String toString() {
	    return JSON.toJSONString(this);
	}
}
